package com.seer.auto.error;

import com.seer.auto.dto.ErrorCode;
import org.springframework.dao.DataAccessException;

public class DataAccessNotFoundException extends DataAccessException implements BusinessException {

    private ErrorCode code = null;
    private String error = null;

    public DataAccessNotFoundException(String msg) {
        super(msg);
        this.code = ErrorCode.NOT_FOUND;
        this.error = "无法找到该对象";
    }

    @Override
    public ErrorCode code() {
        return code;
    }

    @Override
    public String error() {
        return error;
    }
}
